package com.ama.service.impl;

import com.ama.dao.BuildDao;
import com.ama.pojo.Build;
import com.ama.service.BuildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BuildServiceImpl implements BuildService {
    @Autowired
    private BuildDao buildDao;

    @Override
    public int deleteById(Long buildId) {
        return buildDao.deleteById(buildId);
    }

    @Override
    public int insertBuild(Build build) {
        return buildDao.insertBuild(build);
    }

    @Override
    public int insertSelective(Build build) {
        return buildDao.insertSelective(build);
    }

    @Override
    public Build selectById(Long buildId) {
        return buildDao.selectById(buildId);
    }

    @Override
    public List<Build> selectByEstateId(Long estateId) {
        return buildDao.selectByEstateId(estateId);
    }

    @Override
    public int updateByIdSelective(Build build) {
        return buildDao.updateByPrimaryKey(build);
    }

    @Override
    public int updateById(Build build) {
        return buildDao.updateById(build);
    }
}
